import { createApp } from 'vue'
import App from './App2.vue'
import router from './router'
import eeui from "../ee-ui/index"
import eeVuex from './ee-vuex'
window.docs = require('../../ee-ui.doc.json');

// import 'vant/lib/index.css';
// import vant from 'vant'

// console.log('process.env', process.env)
// if (process.env.VUE_APP_MAIN) {
//     import(process.env.VUE_APP_MAIN);
// } else {
let vue = createApp(App)
vue
  .use(eeui)
  .use(router)
  .use({
    install(vue) {
      // 自动导入项目里的所有组件
      const components = require.context('./', true, /\.vue$/)
      components.keys().forEach(i => {
        const component = components(i).default;
        if (component.name)
          vue.component(component.name, component);
      })
    }
  })
  // .use(vant)
  .use(eeVuex)
  .mount('#app')
// }